package com.niit.session16;

import java.util.Locale;
import java.util.ResourceBundle;
import java.util.Scanner;

public class LocalMenu {
	    ResourceBundle  local = ResourceBundle.getBundle("content", new Locale ("zh", "CN"));
	public static void main(String[] args) {
		new LocalMenu().showMenu();
	}
	
	public void showMenu() {
		System.out.println(local.getString("newGame"));
		System.out.println(local.getString("continueGame"));
		System.out.println(local.getString("changeLanguage"));
		System.out.println(local.getString("exit"));
		System.out.println(local.getString("option"));
		Scanner sc = new Scanner(System.in);
		int nextInt = sc.nextInt();
		switch (nextInt) {
		case 1:
			
			break;
		case 2:
			
			break;
		case 3:
			changeLanguage();
			break;
		case 4:
			
			break;

		default:
			break;
		}
		sc.close();
	}
	
	private void changeLanguage() {
		System.out.println(local.getString("lan1"));
		System.out.println(local.getString("lan2"));
		System.out.println(local.getString("option"));
		Scanner sc = new Scanner(System.in);
		int nextInt = sc.nextInt();
		switch (nextInt) {
		case 1:
			local = ResourceBundle.getBundle("content", new Locale ("zh", "CN"));
			break;
		case 2:
			local = ResourceBundle.getBundle("content",  new Locale ("en", "US"));
			break;
		
		}
		showMenu();
		sc.close();
	}
	
}
